<template>
	<view>
		<!-- 02. 商品数据区 -->
		<view class="bg-main padding">

			<view class="dflex-b margin-tb-sm">
				<view class="dflex">
					<image src="https://img.shihuashengyi.cn/static/images/user/default.png" class="headimg border-radius-c"
						style="width: 70rpx; height: 50rpx;"></image>
					<view class="margin-left-xs fs-xxs">世华圣医</view><!--{{notice.createUser}}-->
				</view>
				<view class="bg-drak border-radius-lg padding-lr fs-xs dflex-c" @click="toFollow">
					<text class="padding-tb-16" style="margin-left: 6rpx;">{{notice.createTime}}</text>
				</view>
			</view>

			<text class="title fwb clamp-2 fs margin-bottom-xs" >{{notice.title}}</text>
			<view class="" v-html="notice.content"/>
		</view>
	</view>
</template>

<script>
	import {notice_detail} from "../../js_sdk/apis/notice.js"
	export default {
		data() {
			return {
				notice:{}
			};
		},
		onLoad({id}) {
			notice_detail({id}).then(res=>{
				this.notice=res.data
			})
		},
		onShareAppMessage: function(ops) {
			let _this = this;
			let mid = 0;
			if (_this.member && _this.member._id) {
				mid = _this.member._id;
			}

			return {
				title: '健康托起幸福  文化引领未来',
				path: `/pages/shopping/detail?id=${this.id}&mid=${mid}`, //这里设定都是以"/page"开头,并拼接好传递的参数
				success: function(res) {
					// 转发成功
					console.log('转发成功', res);
				},
				fail: function(res) {
					// 转发失败
					console.log('转发失败', res);
				}
			};
		},
		methods: {
			toShare() {
				this.$api.msg('分享')
			}
		}
	};
</script>

<style lang="scss">
	page {
		background: #fff;
		padding-bottom: 120rpx;
	}

	/* 01. 轮播区 */
	.swiper-area {
		height: 66vh;
		top: 0;
		z-index: -1;
	}

	/* #ifndef MP */
	.swiper-area {
		margin-top: calc(44px + env(safe-area-inset-top));
	}

	/* #endif */

	/* 02. 商品数据区 */
	.goods-area {
		margin-top: 66vh;

		.price-box {
			display: flex;
			align-items: baseline;
		}

		.title {
			color: $font-color-dark;
			height: 46rpx;
			line-height: 46rpx;
		}
	}


	/* 07. 操作区 */
	.oper-area {
		left: 0;
		bottom: 0;
		background: rgba(245, 245, 245, 0.95);
		box-shadow: 0 0 20rpx 0 #f0f0f0;
		height: 100rpx;
		z-index: 95;

		.btn-area {
			color: #000;
			width: 96rpx;
			margin-right: 30rpx;
			text-align: center;

			.iconfont {
				font-size: 40rpx;
				line-height: 48rpx;
				margin-right: 6rpx;
			}
		}
	}
</style>
